package com.antler.smt.service.portal;

import com.antler.smt.enums.ResultCodeEnum;
import com.antler.smt.request.portal.GetReceivingAddressReq;
import com.antler.smt.request.portal.MemberLoginReq;
import com.antler.smt.response.admin.GetReceivingAddressListResp;
import com.antler.smt.response.base.Result;
import com.github.pagehelper.Page;

/**
 * 收货地址接口
 *
 * @author zhangyi
 * @date 2018/3/27 17:30
 */
public interface ReceivingAddressService {

    /**
     * 获取其收货地址
     *
     * @param memberId
     * @return
     */
    Result<GetReceivingAddressListResp> getpurchaserAddressList(long memberId);

    /**
     * 添加收货地址
     *
     * @param addressReq 请求实体
     * @param memberId 会员id
     * @return
     */
    Result<ResultCodeEnum> writeReceivingAddress(GetReceivingAddressReq addressReq,long memberId);

    /**
     *  获取一条指定的收货地址信息
     *
     * @param id
     * @return
     */
    Result<GetReceivingAddressListResp> getReceivingAddress(Long id);

    /**
     * 修改收货地址
     *
     * @param addressReq 请求实体
     * @param memberId 会员id
     * @return
     */
    Result<ResultCodeEnum> updateReceivingAddress(GetReceivingAddressReq addressReq,long memberId);

    /**
     * 删除收货地址
     *
     * @param id 地址id
     * @return
     */
    Result<ResultCodeEnum> delReceivingAddress(long id);

    /**
     * 设置默认收货地址
     *
     * @param id 地址id
     * @return
     */
    Result<ResultCodeEnum> defaultReceivingAddress(long id);

}
